How to run a command line scripts via DXL

Here I need to generate documents from DOORS using RPE, but I want to use a DXL button to set the RPE parameters and fire it without any manual action.

I know that we can run RPE with a command line switch, So can we just run a command line via DXL and do what I want?

or anyone know some other methods to impelement my requirement?

many thanks!!
SystemAdmin - Tue Jan 08 01:16:39 EST 2013

Re: How to run a command line scripts via DXL
Tony_Goodman - Thu Jan 10 05:49:55 EST 2013

This example should get you started. This is cut from a larger script that dynamically creates a specification file before calling RPE, but you could create this manually and store it somewhere.
 

//   RPE Launcher
 
/*

    12-OCT-2011         Tony Goodman    Server installation
*/
 
const string RPE_FOLDER = "<server location>"
 
const string RPE_HOME = RPE_FOLDER "\\Rational\\Publishing Engine\\1.1.2"
 
const string RPE_LAUNCHER = RPE_HOME "\\launcher\\rpe-launcher.exe"
 
// you must first create he specification file
const string SPECIFICATION_FILE = "generated.dsx"
 
bool showResults = true
 
void rpeLauncher()
{
        Buffer cmd = create
 
        // Set the RPE_HOME environment variable before calling launcher
        // This does not interfere with any local installation of RPE as it gets
        // overwritten when RPE in started locally.
        setenv("RPE_HOME", RPE_HOME)
        
        cmd += RPE_LAUNCHER
        
        // specify the output folder
        cmd += " -data "
        cmd += "\"" rpeOutputFolder "\""
        
        // publish from the supplied specification file
        cmd += " -publish "
        cmd += "\"" SPECIFICATION_FILE "\""
        
        if (!showResults)
        {
                // inhibit display of launcher results window
                cmd += " -noresult"
        }
        
        // give command string to windows for execution
        // We cannot wait for the result by using win32SystemWait_() because RPE is using the current instance of DOORS
        // and doing so would result in dead-lock (RPE trying to communicate with a process that is stopped, 
        // waiting for RPE to finish).
        system(stringOf(cmd))
        
        delete(cmd)
}
 
rpeLauncher()


Tony Goodman, www.smartdxl.com

Re: How to run a command line scripts via DXL
Mathias Mamsch - Fri Jan 11 05:03:02 EST 2013

The following post might also help you. It deals with automating the RPE GUI to start the RPE export. Regards, Mathias

https://www.ibm.com/developerworks/forums/thread.jspa?messageID=14612904&#14612904


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS